﻿@using LearnASPNETCore
@using LearnASPNETCore.Models;
@using Microsoft.Extensions.Options
@model IEnumerable<Department>
@*这里我选的是Razor页面，结果模型类型错误不懂找了好久的bug，哭泣*@
@*Controller传递过来的department参数是IEnumerable<Department>类型，需要修改模型参数，Department还要添加model引用才能找到*@

@*注意：这个文件的模板是Razor视图*@
@*如果选择的Razor页面，会包含模型类型，这个模型参数类型是错误的需要修改，否则会报错，一定要注意*@




<div class="row">
    <div class="col-md-10 offset-md-2">
        <table class="table">
            <tr>
                <th>Name</th>
                <th>Location</th>
                <th>Employee Count</th>
                <th>操作</th>
            </tr>
            <!--显示Department-->
            @Html.DisplayForModel()
        </table>
    </div>
</div>
<div class="row">
    <div class="col-md-2">
        @await Component.InvokeAsync("CompanySummary",new {title = "部门列表页的汇总"})
        <vc:company-summary title="部门列表页的汇总2"></vc:company-summary>
    </div>
    <div class="col-md-4">
        <a asp-action="Add">Add</a>
    </div>
</div>